<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Home extends CI_Controller {

    public function index() {
        if ($this->session->userdata('login_state') == FALSE ) {
            $session_data = $this->session->userdata('logged_in');
            $data['query'] = $this->db->get('pizarra');
            $this->load->view('index.php/mipared', $data);
            $this->session->set_userdata('login_state', TRUE);
        
        } else {
            //If no session, redirect to login page
            redirect('index.php/login');
        }
    }

    function goPizarra() {
        $this->load->view('crearPizarra');
    }

    public function login() {
        
    }

}